package edu.matrix;

import android.app.ActionBar;
import android.app.Fragment;
import android.os.Bundle;

public class SecondMainActivity extends MainActivity {

	ActionBar.Tab tab1, tab2, tab3;
	
	
	Fragment fragmentTab1 = new FragmentTab1();
	Fragment fragmentTab2 = new FragmentTab2();
	Fragment fragmentTab3 = new FragmentTab3();

	
	/** Called when the activity is first created. ***/
	
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.second_activity);
		
		
	ActionBar actionBar = getActionBar();
	actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
	
	tab1 = actionBar.newTab().setText("Save a String");
	tab2 = actionBar.newTab().setText("Save a Picture");
	tab3 = actionBar.newTab().setText("Face Recognition");
	
	
	tab1.setTabListener(new MyTabListener(fragmentTab1));
	tab2.setTabListener(new MyTabListener(fragmentTab2));
	tab3.setTabListener(new MyTabListener(fragmentTab3));
	
	actionBar.addTab(tab1);
	actionBar.addTab(tab2);
	actionBar.addTab(tab3);
		
		
	}
	
}
